package com.diors.commons.network.module.model;

import com.diors.commons.network.module.CommandType;

/**
 * 命令模型
 * @author	darren.ouyang
 * @data	2013-9-11
 */
public class CommandModel 
{
	private int opcode;
	
	private CommandType type;
	
	private CommandInfoModel[] commandInfoModel;
	
	public CommandModel (){}
	
	public CommandModel (int opcode, String type)
	{
		this.opcode = opcode;
		if("client".equalsIgnoreCase(type))
		{
			this.type = CommandType.CLIENT_TYPE;
		}
		else
		{
			this.type = CommandType.SERVER_TYPE;
		}
	}
	
	public int getOpcode()
	{
		return opcode;
	}

	public void setOpcode(int opcode) 
	{
		this.opcode = opcode;
	}

	public CommandInfoModel[] getCommandInfoModel()
	{
		return commandInfoModel;
	}

	public void setCommandInfoModel(CommandInfoModel[] commandInfoModel) 
	{
		this.commandInfoModel = commandInfoModel;
	}

	public CommandType getType() {
		return type;
	}

	public void setType(CommandType type) {
		this.type = type;
	}
}
